<?php

namespace pos\modules\mall\controllers;

use pos\extensions\ApiBaseController;
use pos\services\mall\MallHomeService;

class MallHomeController extends ApiBaseController
{

    // 日报表
    public function actionSta()
    {
        $params = \Yii::$app->request->post();
        $rules = [];
        $validate = $this->validateParams($params, $rules);
        if ($validate) {
            return $this->jsonError($validate);
        }
        return MallHomeService::sta($this->params);
    }

    // 日报表
    public function actionPosSta()
    {
        $params = \Yii::$app->request->post();
        $rules = [];
        $validate = $this->validateParams($params, $rules);
        if ($validate) {
            return $this->jsonError($validate);
        }
        return MallHomeService::posSta($this->params);
    }
}
